package de.playmee.enums;

public enum Season {

	Spring,
	Summer,
	Autumn,
	Winter;
	
	/**
	 * returns the current season
	 * SPRING: 01.03. - 31.05.
	 * SUMMER: 01.06. - 31.08.
	 * AUTUMN: 01.09. - 30.11.
	 * WINTER: 01.12. - 28./29.02.
	 * 
	 * @param month
	 * @return Season
	 */
	public static Season getCurrentSeason(int month) {
		if (month >= 3 && month < 6) {
			return Spring;
		} else if (month >= 6 && month < 9) {
			return Summer;
		} else if (month >= 9 && month < 12) {
			return Autumn;
		} else {
			return Winter;
		}
	}
	
	/**
	 * returns an array with all seasons
	 * needed for editing channel and track settings
	 * 
	 * @return array
	 */
	public static String[] getStringList() {
		String[] seasons = new String[4];
		seasons[0] = Spring.toString();
		seasons[1] = Summer.toString();
		seasons[2] = Autumn.toString();
		seasons[3] = Winter.toString();
		return seasons;
	}
}
